package com.scaffold.converter;

import com.scaffold.model.domain.UserDO;
import com.scaffold.model.vo.UserPostVO;
import com.scaffold.model.vo.UserPutVO;
import com.scaffold.model.vo.UserVO;

import java.util.List;

/**
 * @author Da Shuai
 * @since 2021-08-21 15:43:26
 */
public class UserConverter {

    public static UserVO toVO(UserDO userDO) {
        if (userDO == null) {
            return null;
        }
        UserVO vo = new UserVO();
        vo.setId(userDO.getId());
        vo.setUsername(userDO.getName());
        vo.setPassword(userDO.getPassword());
        return vo;
    }

    public static List<UserVO> toVOList(List<UserDO> userList) {
        return null;
    }

    public static UserDO toDO(UserPostVO postVO) {
        return null;
    }

    public static UserDO toDO(UserPutVO putVO) {
        return null;
    }
}
